import request from '@/utils/request'

// 根据id查询题目选项
export function getQuestionOption(id) {
  return request({
    url: '/ssh/questionOption/' + id,
    method: 'get'
  })
}

// 根据题目ID查询选项
export function getQuestionOptionByQuestionId(questionId) {
  return request({
    url: '/ssh/questionOption/queryByQuestionId/' + questionId,
    method: 'get'
  })
}

// 动态添加选项信息
export function addQuestionOption(data) {
  return request({
    url: '/ssh/questionOption',
    method: 'post',
    data: data
  })
}

// 动态修改选项信息
export function updateQuestionOption(data) {
  return request({
    url: '/ssh/questionOption',
    method: 'put',
    data: data
  })
}

// 通过题目ID查询选项（包含题目信息）
export function getQuestionOptionWithQuestion(questionId) {
  return request({
    url: '/ssh/questionOption/queryWithQuestion/' + questionId,
    method: 'get'
  })
}
